
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(Should be able to get the area)
	{
	    
		Rectangle rect(3,4);
		ASSERT_EQ(12, rect.getArea());
	}

	TEST(Should be able to get the perimeter)
	{
		Rectangle rect(3,4);
		ASSERT_EQ(14, rect.getPerimeter());
	}

	TEST(Should be able to set the width)
	{
		Rectangle rect(3,4);
		rect.setWidth(10);
		ASSERT_EQ(26, rect.getPerimeter());
		ASSERT_EQ(30, rect.getArea());
	}

	TEST(Should be able to set the length)
	{
		Rectangle rect(3,4);
		rect.setLength(10);
		ASSERT_EQ(28, rect.getPerimeter());
		ASSERT_EQ(40, rect.getArea());
	}
};
